#pragma once
#include <WS2tcpip.h>
#include "IpAddress.h"

class CSocketTcp
{
public:
    CSocketTcp();
    ~CSocketTcp();

    int InitSocket();
    int CreateSocket();
    int Listen(int iValue);
    int Accept(CSocketTcp& ClientSocket);
    int Send(char *szBuffer,int iLenth);
    int Recv(char *szBuffer, int iLenth);
    int Bind(CIpAddress& SeverIpAdress);
    int Connect(CIpAddress& SeverIpAdress);
    int GetSocketValue();
    CIpAddress& GetIpAdress();

private:
    int SocketValue;
    CIpAddress IpAdress;
};

